package cn.wolfcode.web.controller;

import cn.wolfcode.service.IBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName IndexController
 * @Author
 * @Date 2021/1/13 13:36
 * @Version 1.0
 * @Name:lzh
 **/

@Controller
public class IndexController {

    @Autowired
    private IBusinessService businessService;

    @RequestMapping("/index")
    public String index(Model model){
            model.addAttribute("business",businessService.selectMainStore());
            model.addAttribute("businesss",businessService.listAll());
            return "index";
    }
}
